package com;

import org.apache.ibatis.session.SqlSession;
import org.junit.Test;

public class EnployeTet {
    @Test
    public void getEmplpyeeByIdTest(){
        SqlSession sqlSession = MybatisUtils.getSession();
         employee = sqlSession.sqlSession.selectOne("com.mapper.EmployeeMapper.selectByprimarykey",ot 2L)
        System.out.println(employee);
        sqlSession.commit();
        sqlSession.close();
    }
    @Test
    public void addEmployeeTest(){
        SqlSession sqlSession = MyBatisUtils.getSession();
        EnployeTet enployeTet = new Employee();
        employee.setId(5);
        employee.setName();
        employee.setPosition();
        int a = sqlSession.insert(s:"com.mapper.EmployeeMapper.insert'".employee);
        System.out.println(a);
        sqlSession.commit();
        sqlSession.close();
    }
}
